home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / progjour / 1988 / 01 / listing2.c < prev    next >
Text File  |  1987-12-28  |  640b  |  22 lines

  1.   /*
  2.    * gettix.c  -- Gets the current timer tick from the BIOS in two ways:
  3.    *
  4.    *          1.) Through the BIOS            - The preferred way
  5.    *          2.) Directly via a far pointer  - The unrecommended way
  6.    *  Copyright Frank D. Greco, 1987
  7.    *  Page 50, Volume 6.1 Programmer's Journal
  8.    */
  9.   
  10.   #include <dos.h>
  11.   
  12.   main()
  13.   {
  14.       unsigned long gettime();
  15.       long far *fp;
  16.   
  17.       FP_SEG(fp) = 0x0040;
  18.       FP_OFF(fp) = 0x006C;
  19.   
  20.       printf("BIOS: %lu   Thru far ptr: %lu\n", gettime(), *fp);
  21.   }
  22.